#include <stdio.h>
int main() {
	char a;
	while (scanf_s("%c", &a) == 1) {
		if (a >= 'a' && a <= 'z') {
			printf("%c\n", a - 32);
		}
		if (a >= 'A' && a <= 'Z') {
			printf("%c\n", a + 32);
		}
	}
	return 0;

}
